package com.app.repository.impl;

import com.app.model.main.Feedback;
import com.app.repository.interfaces.FeedbackMapper;
import com.app.support.dao.MybatisDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * Created by Lichaojie on 2017/3/12. It's a beautiful day.
 */
@Repository
public class FeedbackMapperImpl implements FeedbackMapper {

    @Autowired
    private MybatisDao mybatisDao;

    @Override
    public int deleteByPrimaryKey(Long id){
        return mybatisDao.delete("com.app.dao.main.FeedbackMapper",".deleteByPrimaryJey",id);
    }

    @Override
    public int insert(Feedback record){
        return mybatisDao.insert("com.app.dao.main.FeedbackMapper",".insert",record);
    }

    @Override
    public int insertSelective(Feedback record){
        return mybatisDao.insert("com.app.dao.main.FeedbackMapper",".insertSelective",record);
    }

    @Override
    public Feedback selectByPrimaryKey(Long id){
        return mybatisDao.get("com.app.dao.main.FeedbackMapper",".selectByPrimaryKey",id);
    }

    @Override
    public int updateByPrimaryKeySelective(Feedback record){
        return mybatisDao.update("com.app.dao.main.FeedbackMapper",".updateByPrimaryKeySelective",record);
    }
    @Override
    public int updateByPrimaryKeyWithBLOBs(Feedback record){
        return mybatisDao.update("com.app.dao.main.FeedbackMapper",".updateByPrimaryKeyWithBLOBs",record);
    }

    @Override
    public int updateByPrimaryKey(Feedback record){
        return mybatisDao.update("com.app.dao.main.FeedbackMapper",".updateByPrimaryKey",record);
    }
}
